﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Serialization;
using System.Globalization;

namespace QA_System
{
    // doc va xu ly cau hoi

    public class word_tagger
    {
        string text;
        string pos;
        public string Word_text
        {
            get { return text; }
            set { text = value; }
        }
        public string Word_pos
        {
            get { return pos; }
            set { pos = value; }
        }

        public word_tagger()
        {
            text = "";
            pos = "";
        }
        public word_tagger(string addtext, string addpos)
        {
            text = addtext;
            pos = addpos;
        }
    }

    public class sentence_tagger
    {
        private word_tagger[] sentence_tag;
        public sentence_tagger()
        {
            this.sentence_tag = new word_tagger[100];
            this.Creatsentence(100);

        }

        public sentence_tagger(int totalnode)
        {
            this.sentence_tag = new word_tagger[totalnode];
            this.Creatsentence(totalnode);

        }

        private void Creatsentence(int totalnode)
        {
            for (int i = 0; i < totalnode; i++) sentence_tag[i] = new word_tagger();
        }

        public int totalword()
        {
            int total = 0;
            for (int i = 0; i<sentence_tag.Length; i++)
                if (sentence_tag[i].Word_text != "") total = total + 1;
            return total;

        }

        public word_tagger this[int i]
        {
            get { return sentence_tag[i]; }
            set { sentence_tag[i] = value; }
        }

        public int Sentence_length
        {
            get { return sentence_tag.Length; }
        }
    }    
}



